#!/user/bin/env python3
# -*- coding: utf-8 -*-
import unittest,time

from ddt import ddt,file_data

from selenium import webdriver
from page_object.search_page import SearchPage




@ddt
class Case01(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.driver=webdriver.Chrome()

    @file_data('../data/search.yaml')
    def test_01_search(self,txt):
        sp=SearchPage(self.driver)
        sp.search(txt)
        time.sleep(2)

    def test_02(self):
        self.driver.get('http://www.jd.com')



if __name__ == '__main__':
    unittest.main()

